// 输入用户名和密码
const username = process.argv[2];
const password = process.argv[3];

// 输出原始信息
console.log("用户名:" + username + " 密码:" + password);

// 创建Buffer并进行Base64编码
const authString = username + ":" + password;
const encoded = Buffer.from(authString).toString('base64');

// 输出编码结果
console.log("base64加密:" + encoded);